home *** CD-ROM | disk | FTP | other *** search
/ Minami 78 / MINAMI78.iso / Extra / winamp53.exe / $R0 / Winamp Modern / scripts / shadecontrol.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2006-02-02  |  11KB  |  321 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global ConfigAttribute ConfigAttribute17;
  6. Global ConfigAttribute ConfigAttribute18;
  7. Global ConfigAttribute ConfigAttribute19;
  8. Global ConfigAttribute ConfigAttribute20;
  9. Global ConfigAttribute ConfigAttribute21;
  10. Global ConfigAttribute ConfigAttribute22;
  11. Global ConfigAttribute ConfigAttribute23;
  12. Global ConfigAttribute ConfigAttribute24;
  13. Global ConfigAttribute ConfigAttribute25;
  14. Global ConfigAttribute ConfigAttribute26;
  15. Global ConfigAttribute ConfigAttribute27;
  16. Global ConfigAttribute ConfigAttribute28;
  17. Global ConfigAttribute ConfigAttribute29;
  18. Global ConfigAttribute ConfigAttribute30;
  19. Global ConfigAttribute ConfigAttribute31;
  20. Global ConfigAttribute ConfigAttribute32;
  21. Global ConfigAttribute ConfigAttribute33;
  22. Global ConfigAttribute ConfigAttribute34;
  23. Global ConfigAttribute ConfigAttribute35;
  24. Global ConfigAttribute ConfigAttribute36;
  25. Global ConfigAttribute ConfigAttribute37;
  26. Global ConfigAttribute ConfigAttribute38;
  27. Global ConfigAttribute ConfigAttribute39;
  28. Global ConfigAttribute ConfigAttribute40;
  29. Global ConfigAttribute ConfigAttribute41;
  30. Global ConfigAttribute ConfigAttribute42;
  31. Global ConfigAttribute ConfigAttribute43;
  32. Global Group Group116;
  33. Global Group Group117;
  34. Global Group Group118;
  35. Global Group Group119;
  36. Global Group Group120;
  37. Global Group Group121;
  38. Global Group Group122;
  39. Global Group Group123;
  40. Global Group Group124;
  41. Global Button Button125;
  42. Global Button Button126;
  43. Global Button Button127;
  44. Global Layout Layout128;
  45. Global Layout Layout129;
  46. Global Layer Layer130;
  47. Global Timer Timer131;
  48. Global Text Text132;
  49. Global Button Button133;
  50.  
  51. Function func242();
  52. Function func2505(Int 0);
  53. Function func4044();
  54.  
  55. func242()
  56. {
  57. ConfigAttribute ConfigAttribute74;
  58. ConfigAttribute ConfigAttribute72;
  59. ConfigItem ConfigItem46;
  60. ConfigItem ConfigItem64;
  61. ConfigItem ConfigItem67;
  62. ConfigItem ConfigItem58;
  63. ConfigAttribute ConfigAttribute77;
  64. ConfigItem ConfigItem55;
  65. ConfigItem ConfigItem49;
  66. ConfigAttribute ConfigAttribute79;
  67. ConfigItem ConfigItem52;
  68. ConfigItem ConfigItem69;
  69. ConfigAttribute ConfigAttribute73;
  70. ConfigItem ConfigItem71;
  71. ConfigAttribute ConfigAttribute78;
  72. ConfigItem ConfigItem61;
  73. ConfigAttribute ConfigAttribute84;
  74. ConfigAttribute ConfigAttribute75;
  75. ConfigItem46 = Config.newItem(( "Winamp\ Modern"), ( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  76. ConfigItem49 = Config.newItem(( "Drawers"), ( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  77. ConfigItem52 = Config.newItem(( "Menus"), ( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  78. ConfigItem55 = Config.newItem(( "Main\ Windowshade\ Mode"), ( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  79. ConfigItem58 = Config.newItem(( "Vis\ Buttons"), ( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  80. ConfigItem61 = Config.newItem(( "Notifications"), ( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  81. ConfigItem64 = Config.newItem(( "Songticker"), ( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  82. ConfigItem67 = Config.newItem(( "Hidden"), ( "\{E9C2D926\-53CA\-400f\-9A4D\-85E31755A4CF\}"));
  83. ConfigItem69 = Config.getItem(( "\{1828D28F\-78DD\-4647\-8532\-EBA504B8FC04\}"));
  84. ConfigItem71 = Config.getItem(( "\{6559CA61\-7EB2\-4415\-A8A9\-A2AEEF762B7F\}"));
  85. ConfigAttribute72 = ConfigItem69.newAttribute(( "Winamp\ Modern"), ( ""));
  86. ConfigAttribute72.setData(( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  87. ConfigAttribute73 = ConfigItem46.newAttribute(( "Drawers"), ( ""));
  88. ConfigAttribute73.setData(( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  89. ConfigAttribute74 = ConfigItem46.newAttribute(( "Menus"), ( ""));
  90. ConfigAttribute74.setData(( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  91. ConfigAttribute75 = ConfigItem46.newAttribute(( "Main\ Windowshade\ Mode"), ( ""));
  92. ConfigAttribute75.setData(( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  93. ConfigAttribute77 = ConfigItem46.newAttribute(( "Vis\ Shortcut\ Button"), ( ""));
  94. ConfigAttribute77.setData(( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  95. ConfigAttribute78 = ConfigItem46.newAttribute(( "Notifications"), ( ""));
  96. ConfigAttribute78.setData(( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  97. ConfigAttribute79 = ConfigItem46.newAttribute(( "Songticker"), ( ""));
  98. ConfigAttribute79.setData(( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  99. ConfigAttribute17 = ConfigItem49.newAttribute(( "Animate\ Video\/Vis\ Drawer\ \(disabled\ if\ opacity\ \<\ 100\%\)"), ( "0"));
  100. ConfigAttribute18 = ConfigItem49.newAttribute(( "Animate\ Config\ Drawer"), ( "0"));
  101. ConfigAttribute84 = ConfigItem49.newAttribute(( "sep1"), ( ""));
  102. ConfigAttribute84.setData(( "\-"));
  103. ConfigAttribute21 = ConfigItem49.newAttribute(( "Open\ Video\/Vis\ from\ the\ top"), ( "0"));
  104. ConfigAttribute22 = ConfigItem49.newAttribute(( "Open\ Video\/Vis\ from\ the\ bottom"), ( "1"));
  105. ConfigAttribute23 = ConfigItem49.newAttribute(( "Bypass\ setting\ to\ keep\ in\ screen"), ( "1"));
  106. if(( ConfigAttribute21.getData() == ( "1"))) {
  107. ConfigAttribute21.onDataChanged();
  108. } else {
  109. ConfigAttribute22.onDataChanged();
  110. }
  111. ConfigAttribute25 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Main\ Window"), ( "1"));
  112. ConfigAttribute26 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Playlist\ Editor"), ( "1"));
  113. ConfigAttribute27 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Media\ Library"), ( "1"));
  114. ConfigAttribute84 = ConfigItem46.newAttribute(( "sep1"), ( ""));
  115. ConfigAttribute84.setData(( "\-"));
  116. ConfigAttribute19 = ConfigItem46.newAttribute(( "Detach\ Vis\ Window"), ( "0"));
  117. ConfigAttribute20 = ConfigItem46.newAttribute(( "Detach\ Video\ Window"), ( "0"));
  118. ConfigAttribute24 = ConfigItem71.newAttribute(( "Equalizer\ Alt\+G"), ( "0"));
  119. ConfigAttribute84 = ConfigItem46.newAttribute(( "sep2"), ( ""));
  120. ConfigAttribute84.setData(( "\-"));
  121. ConfigAttribute31 = ConfigItem46.newAttribute(( "Enable\ Beat\ Visualization"), ( "1"));
  122. ConfigAttribute28 = ConfigItem55.newAttribute(( "Link\ Position\ and\ Width"), ( "1"));
  123. ConfigAttribute29 = ConfigItem55.newAttribute(( "Link\ Position\,\ Unlink\ Width"), ( "0"));
  124. ConfigAttribute30 = ConfigItem55.newAttribute(( "Unlink\ Position\ and\ Width"), ( "0"));
  125. ConfigAttribute33 = ConfigItem58.newAttribute(( "Open\ Context\ Menu"), ( "1"));
  126. ConfigAttribute32 = ConfigItem58.newAttribute(( "Open\ Configuration"), ( "0"));
  127. ConfigAttribute36 = ConfigItem61.newAttribute(( "Show\ always"), ( "0"));
  128. ConfigAttribute35 = ConfigItem61.newAttribute(( "Show\ with\ windowshade\ and\ when\ minimized"), ( "0"));
  129. ConfigAttribute34 = ConfigItem61.newAttribute(( "Show\ only\ when\ minimized"), ( "0"));
  130. ConfigAttribute37 = ConfigItem61.newAttribute(( "Never\ show"), ( "1"));
  131. ConfigAttribute84 = ConfigItem61.newAttribute(( "sep1"), ( ""));
  132. ConfigAttribute84.setData(( "\-"));
  133. ConfigAttribute41 = ConfigItem61.newAttribute(( "Disable\ in\ fullscreen"), ( "1"));
  134. ConfigAttribute38 = ConfigItem67.newAttribute(( "Notifications\ fade\ in\ time"), ( "1000"));
  135. ConfigAttribute39 = ConfigItem67.newAttribute(( "Notifications\ fade\ out\ time"), ( "5000"));
  136. ConfigAttribute40 = ConfigItem67.newAttribute(( "Notifications\ display\ time"), ( "2000"));
  137. ConfigAttribute42 = ConfigItem64.newAttribute(( "Enable\ Songticker\ scrolling"), ( "1"));
  138. ConfigAttribute43 = ConfigItem64.newAttribute(( "Disable\ Songticker\ scrolling"), ( "0"));
  139. return Null;
  140. }
  141.  
  142. System.onScriptLoaded()
  143. {
  144. func242();
  145. Group116 = System.getScriptGroup();
  146. Layout128 = Group116.getParentLayout();
  147. Layout129 = Group116.getParentLayout().getContainer().getLayout(( "normal"));
  148. Group117 = Group116.findObject(( "shadeX1"));
  149. Group118 = Group116.findObject(( "shadeX2"));
  150. Group119 = Group116.findObject(( "shadeX3"));
  151. Button127 = Group116.findObject(( "shadeeq"));
  152. Group120 = Group116.findObject(( "shadedisplay"));
  153. Group121 = Group116.findObject(( "shadedisplay2"));
  154. Group122 = Group116.findObject(( "shadetimer"));
  155. Group123 = Group116.findObject(( "shadeticker"));
  156. Group124 = Group116.findObject(( "shadevis"));
  157. Button125 = Group116.findObject(( "shade\.expand"));
  158. Button126 = Group116.findObject(( "shade\.reduce"));
  159. Button133 = Group116.findObject(( "shadect"));
  160. Text132 = Group116.findObject(( "SongtickerShade"));
  161. Timer131 = ( new Timer);
  162. Timer131.setDelay(1000);
  163. Layer130 = Group116.findObject(( "volumebarShade"));
  164. Layer130.setXmlParam(( "w"), System.integerToString(( ( ( System.getVolume() / 255) * 40) + 5)));
  165. func4044();
  166. return Null;
  167. }
  168.  
  169. System.onScriptUnloading()
  170. {
  171. delete Timer131;
  172. return Null;
  173. }
  174.  
  175. Timer131.onTimer()
  176. {
  177. Text132.setText(( ""));
  178. Timer131.stop();
  179. return Null;
  180. }
  181.  
  182. Group116.onResize(int x, int y, int w, int h)
  183. {
  184. func2505(w);
  185. return Null;
  186. }
  187.  
  188. Button127.onLeftClick()
  189. {
  190. ConfigAttribute24.setData(( "1"));
  191. return Null;
  192. }
  193.  
  194. func2505(Int 0)
  195. {
  196. Int Int164;
  197. Int Int161;
  198. Int161 = System.getPrivateInt(( "winamp5"), ( "ShowShadeButtons"), 0);
  199. if(Int161) {
  200. Button125.show();
  201. Button126.hide();
  202. } else {
  203. Button125.hide();
  204. Button126.show();
  205. }
  206. Group117.hide();
  207. Group118.hide();
  208. Group119.hide();
  209. Group120.hide();
  210. Group121.hide();
  211. Group122.hide();
  212. Group123.hide();
  213. Group124.hide();
  214. if(( Int158 < 400)) {
  215. Int164 = ( Int158 - 356);
  216. Group120.setXmlParam(( "w"), System.integerToString(Int164));
  217. Group120.show();
  218. Group122.show();
  219. if(( Int158 < 420)) {
  220. Group123.show();
  221. Group123.setXmlParam(( "w"), System.integerToString(Int164));
  222. if(( Int158 < 560)) {
  223. Group120.hide();
  224. Group121.setXmlParam(( "w"), System.integerToString(( Int164 - 45)));
  225. Group121.show();
  226. Group123.setXmlParam(( "w"), System.integerToString(( Int164 - 56)));
  227. if(Int161) {
  228. Group117.setXmlParam(( "x"), ( "\-100"));
  229. Group117.show();
  230. if(( Int158 < 583)) {
  231. Group121.setXmlParam(( "w"), System.integerToString(( Int164 - 68)));
  232. Group123.setXmlParam(( "w"), System.integerToString(( Int164 - 79)));
  233. Group117.setXmlParam(( "x"), ( "\-123"));
  234. Group118.setXmlParam(( "x"), ( "\-80"));
  235. Group118.show();
  236. if(( Int158 < 642)) {
  237. Group121.setXmlParam(( "w"), System.integerToString(( Int164 - 127)));
  238. Group123.setXmlParam(( "w"), System.integerToString(( Int164 - 138)));
  239. Group117.setXmlParam(( "x"), ( "\-182"));
  240. Group118.setXmlParam(( "x"), ( "\-139"));
  241. Group119.setXmlParam(( "x"), ( "\-116"));
  242. Group119.show();
  243. if(( Int158 < 660)) {
  244. Group124.setXmlParam(( "x"), System.integerToString(( - 257)));
  245. Group124.show();
  246. Group123.setXmlParam(( "w"), System.integerToString(( Int164 - 194)));
  247. }
  248. }
  249. }
  250. } else {
  251. Group121.setXmlParam(( "w"), System.integerToString(Int164));
  252. Group124.setXmlParam(( "x"), System.integerToString(( - 130)));
  253. Group124.show();
  254. Group123.setXmlParam(( "w"), System.integerToString(( Int164 - 66)));
  255. }
  256. }
  257. }
  258. }
  259. return Null;
  260. }
  261.  
  262. System.onKeyDown(String key)
  263. {
  264. if(( ( ( System.Strleft(key, 4) == ( "ctrl")) && ( System.strsearch(key, ( "\+w")) != ( - 1))) && ( Layout128.isActive() || Layout129.isActive()))) {
  265. if(Layout128.isVisible()) {
  266. Layout128.getContainer().switchToLayout(( "normal"));
  267. } else {
  268. Layout128.getContainer().switchToLayout(( "shade"));
  269. }
  270. complete;
  271. }
  272. return Null;
  273. }
  274.  
  275. Button125.onLeftClick()
  276. {
  277. System.setPrivateInt(( "winamp5"), ( "ShowShadeButtons"), 0);
  278. func2505(Layout128.getGuiW());
  279. return Null;
  280. }
  281.  
  282. Button126.onLeftClick()
  283. {
  284. System.setPrivateInt(( "winamp5"), ( "ShowShadeButtons"), 1);
  285. func2505(Layout128.getGuiW());
  286. return Null;
  287. }
  288.  
  289. System.onVolumeChanged(int newvol)
  290. {
  291. Layer130.setXmlParam(( "w"), System.integerToString(( ( ( newvol / 255) * 40) + 5)));
  292. Timer131.start();
  293. Text132.setText(( ( ( "Volume\:") + System.integerToString(( newvol / ( 2.54999995231628)))) + ( "\%")));
  294. return Null;
  295. }
  296.  
  297. ConfigAttribute42.onDataChanged()
  298. {
  299. func4044();
  300. return Null;
  301. }
  302.  
  303. func4044()
  304. {
  305. if(( ConfigAttribute42.getData() == ( "1"))) {
  306. Text132.setXmlParam(( "ticker"), ( "1"));
  307. } else {
  308. Text132.setXmlParam(( "ticker"), ( "0"));
  309. }
  310. return Null;
  311. }
  312.  
  313. Button133.onRightButtonDown(int x, int y)
  314. {
  315. System.triggerAction(Button133, ( "ThemesSlotsMenu"), ( ""));
  316. complete;
  317. return Null;
  318. }
  319.  
  320.  
  321.